#Problema 36: Caicuiar z de acuerdo corj la formula siguiente.
#Asignar las variables numericas aprobadas.
#Sean a = 4, b = 6, x = 8, y = 2, yc = 5 cuan-
#do “corra” su programa;
#z = (a+ b)3 - (x + y)2 (a*c)4 + 1/ 2 (c + x).
#Autor:Verdi Vega Evelin
#File name:Problema36.s

.LC0:
        .ascii  "El resultado es:\000"
main:
        stmfd   sp!, {r4, fp, lr}
        add     fp, sp, #8
        sub     sp, sp, #44
        mov     r3, #4
        str     r3, [fp, #-16]
        mov     r3, #6
        str     r3, [fp, #-20]
        mov     r3, #8
        str     r3, [fp, #-24]
        mov     r3, #2
        str     r3, [fp, #-28]
        mov     r3, #5
        str     r3, [fp, #-32]
        ldr     r2, [fp, #-16]
        ldr     r3, [fp, #-20]
        add     r3, r2, r3
        eor     r3, r3, #3
        mov     r0, r3
        bl      __aeabi_i2f
        mov     r3, r0
        str     r3, [fp, #-36]    @ float
        ldr     r2, [fp, #-24]
        ldr     r3, [fp, #-28]
        add     r3, r2, r3
        eor     r3, r3, #2
        mov     r0, r3
        bl      __aeabi_i2f
        mov     r3, r0
        str     r3, [fp, #-40]    @ float
        ldr     r2, [fp, #-16]
        ldr     r3, [fp, #-32]
        rsb     r3, r3, r2
        eor     r3, r3, #4
        mov     r0, r3
        bl      __aeabi_i2f
        mov     r3, r0
        str     r3, [fp, #-44]    @ float
        ldr     r3, .L2   @ float
        str     r3, [fp, #-48]    @ float
        ldr     r0, [fp, #-40]    @ float
        ldr     r1, [fp, #-44]    @ float
        bl      __aeabi_fmul
        mov     r3, r0
        ldr     r0, [fp, #-36]    @ float
        mov     r1, r3
        bl      __aeabi_fsub
        mov     r3, r0
        mov     r0, r3
        ldr     r1, [fp, #-48]    @ float
        bl      __aeabi_fadd
        mov     r3, r0
        str     r3, [fp, #-52]    @ float
        ldr     r0, [fp, #-52]    @ float
        bl      __aeabi_f2d
        mov     r3, r0
        mov     r4, r1
        ldr     r0, .L2+4
        mov     r2, r3
        mov     r3, r4
        bl      printf
        mov     r3, #0
        mov     r0, r3
        sub     sp, fp, #8
        ldmfd   sp!, {r4, fp, pc}
.L2:
        .word   0
        .word   .LC0
